<template>
    <div>
      <el-card class="present-card">
        <div style="height: 60px;display: flex;">
            <h3 style="line-height: 10px; ">签名证书</h3>
        </div>
        <el-descriptions :data="signingData" :column="1"
        :label-style="LS">
          <el-descriptions-item label="是否签名">{{ signingData.is_signature }}</el-descriptions-item>
          <el-descriptions-item label="是否有效">{{ signingData.is_valid }}</el-descriptions-item>
          <el-descriptions-item label="备注">{{ signingData.signature_name }}</el-descriptions-item>
          <el-descriptions-item label="国家">{{ signingData.country }}</el-descriptions-item>
          <el-descriptions-item label="省份">{{ signingData.province }}</el-descriptions-item>
          <el-descriptions-item label="城市">{{ signingData.city }}</el-descriptions-item>
          <el-descriptions-item label="组织名">{{ signingData.organization }}</el-descriptions-item>
          <el-descriptions-item label="服务商">{{ signingData.serviceName }}</el-descriptions-item>
          <el-descriptions-item label="md5值">{{ signingData.md5 }}</el-descriptions-item>
          <el-descriptions-item label="v1签名">{{ signingData.v1 }}</el-descriptions-item>
          <el-descriptions-item label="v2签名">{{ signingData.v2 }}</el-descriptions-item>
          <el-descriptions-item label="v3签名">{{ signingData.v3 }}</el-descriptions-item>
          <el-descriptions-item label="sha1值">{{ signingData.sha1 }}</el-descriptions-item>
          <el-descriptions-item label="sha256值">{{ signingData.sha256 }}</el-descriptions-item>
      </el-descriptions>
        
        </el-card>
        <br>
    </div>
  </template>
    
    <script>
    export default {
      data() {
        return {
          signingData: [],  
          baseURL: "http://localhost:8000/",
          LS:{color:'#000'},
          ID:[],
        }
      },
    
      mounted() {
        this.savedata();
        this.getMessages();
      },
    
      methods: {
        savedata() {
          var item = localStorage.getItem("data");
          var parse = JSON.parse(item);
          this.ID = parse["signature_id"];
        },
        getMessages:function(){
          //记录this的地址
          let that = this
          //使用Axios实现Ajax请求
          that.axios.get(that.baseURL+"apk/signature/"+that.ID+"/")
          .then(function(res){
            //请求成功后执行的函数
            that.signingData = res.data[0];
          })
          .catch(function(err){
            //请求失败后执行的函数
            console.log(err)
          })
        },
      }
    
    }
    </script>
    
    <style>
    
    </style>
  